﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using CitizenJournalismNetworkServer.Attributes;

namespace CitizenJournalismNetworkServer.Models
{
    public class Collection
    {
        [DatabaseGenerated(System.ComponentModel.DataAnnotations.DatabaseGenerationOption.Identity)]
        [SerializationIgnore]
        public int Id { get; set; }

        [SerializationName("href")]
        public string Href { get; set; }

        [Required]
        [SerializationName("title")]
        public string Title { get; set; }

        [Required]
        [SerializationName("fixed")]
        [SerializationBooleanRepresentation(SerializationBooleanRepresentationAttribute.BooleanRepresentation.YesNo)]
        public bool AreCategoriesFixed { get; set; }

        [SerializationDescend(false)]
        [SerializationName("accept")]
        public virtual ICollection<ContentType> AcceptedTypes { get; set; }

        [SerializationDescend(false)]
        [SerializationName("categories")]
        public virtual ICollection<Category> Categories { get; set; }
    }

}